package com.htao.train.common.util;

import cn.hutool.core.util.IdUtil;

/**
 * @Author： HTTT
 * @Date： 2023/12/22 19:58
 * @Describe：
 */
public class SnowUtil {
    private static long dataCenterId = 1;
    private static long workerId = 1;
    public static long getSnowflakeNextId(){return IdUtil.getSnowflake(dataCenterId, workerId).nextId();
    }
    public static String getSnowflakeNextIdStr(){return IdUtil.getSnowflake(dataCenterId, workerId).nextIdStr();
    }
}
